package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.annotation.AutoTable;
import com.example.annotation.TableColumn;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 用户实体类
 */
@Data
@TableName("tb_user")
@AutoTable(value = "tb_user", comment = "用户表")
public class User {

    @TableId(type = IdType.AUTO)
    @TableColumn(value = "id", type = "BIGINT", primaryKey = true, autoIncrement = true, nullable = false, comment = "主键ID")
    private Long id;

    @TableColumn(value = "username", type = "VARCHAR", length = 50, nullable = false, unique = true, comment = "用户名")
    private String username;

    @TableColumn(value = "password", type = "VARCHAR", length = 100, nullable = false, comment = "密码")
    private String password;

    @TableColumn(value = "age", type = "INT", nullable = true, comment = "年龄")
    private Integer age;

    @TableColumn(value = "num", type = "INT", nullable = true, comment = "数量")
    private Integer num;

    @TableColumn(value = "str1", type = "TEXT", nullable = true, comment = "文本内容")
    private String str1;
}
